package com.beta.service;

import com.baomidou.framework.service.ISuperService;
import com.baomidou.mybatisplus.plugins.Page;
import com.beta.dto.Shipment.ShipmentsDetailDto;
import com.beta.dto.Shipment.ShipmentsDto;
import com.beta.entity.Shipments;

/**
 *
 * Shipments 表数据服务层接口
 *
 */
public interface IShipmentsService extends ISuperService<Shipments> {

    Shipments getShipmentByOrderId(Integer orderId);

    Page<ShipmentsDto> getShipments(Integer courierId, Page<ShipmentsDto> page, String status);

    ShipmentsDetailDto getShipmentsDetail(Integer shipmentsId);

    String generateShipmentCode();

    Page<Shipments> getShipments(Page<Shipments> page,String code,Integer orderId,String courierName,String address);
    /**
     * 运单完成操作
     * @param orderId 订单ID
     */
    Shipments executeCompleteByOrderId(Integer orderId);

//    /**
//     * 接单
//     * @param shipmentsId
//     * @return
//     */
//    public MessageResult<Shipments> executePicking(Integer shipmentsId);
//
//    /**
//     * 出货
//     * @param shipmentsId
//     * @return
//     */
//    public MessageResult<Shipments> executeShipping(Integer shipmentsId);
//
    /**
     * 完成
     * @param shipmentsId
     * @return
     */
     Shipments executeComplete(Integer shipmentsId);

     Shipments executeConfirmAssignment(Integer shipmentsId);

     Shipments executeConfirmShip(Integer shipmentsId);

     Shipments executeReceiptConfirm(Integer shipmentsId);

    void updateShipmentsReceiver(Integer orderId,ShipmentsDto shipmentsDto);
}